package developer.zyk.global.user.bo;

import developer.zyk.global.user.dao.entity.ChatUserDO;
import lombok.Data;

import java.io.Serializable;

/**
 * @author zhangyongkang
 * @time 2025/5/14 15:02
 * @description
 */
@Data
public class UserInfo implements Serializable {
    private Long userId;
    private String userName;
    private String account;


    public static UserInfo of(ChatUserDO chatUserDO) {
        UserInfo userInfo = new UserInfo();
        userInfo.setUserId(chatUserDO.getId());
        userInfo.setUserName(chatUserDO.getUserName());
        userInfo.setAccount(chatUserDO.getAccount());
        return userInfo;
    }
}

